﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Helpers.Tools;

namespace HttpRequester
{
    public class RequestInvokationInfo : InvokationInfo
    {
        protected IRequestStatus StatusItem { get; set; }

        
        
        public RequestInvokationInfo(IRequestStatus statusItem)
            : base()
        {
            StatusItem = statusItem;
        }

        
        
        public override void AddException(string exception)
        {
            StatusItem.IsSuccessfulyInvoked = false;
            StatusItem.ProcessFlag = false;

            base.AddException(exception);
        }

        public override void AddError(string error)
        {
            StatusItem.IsSuccessfulyInvoked = false;
            StatusItem.ProcessFlag = false;

            base.AddError(error);
        }
    }
}
